Difference imaging is a technique for obtaining precise relative photometry of variable sources in crowded stellar fields and, as such, constitutes a crucial part of the data reduction pipeline in surveys for microlensing events or transiting extrasolar planets. The Optimal Image Subtraction (OIS) algorithm permits the accurate differencing of images by determining convolution kernels which, when applied to reference images of particularly good quality, provide excellent matches to the point-spread functions (PSF) in other images of the time series to be analysed. The convolution kernels are built as linear combinations of a set of basis functions, conventionally bivariate Gaussians modulated by polynomials. The kernel parameters must be supplied by the user and should ideally be matched to the PSF, pixel-sampling, and S/N of the data to be analysed. We have studied the outcome of the reduction as a function of the kernel parameters using our implementation of OIS within the TRIPP package. From the analysis of noise-free PSF simulations as well as test images from the ISIS OIS package, we derive qualitative and quantitative relations between the kernel parameters and the success of the subtraction as a function of the PSF sizes and sampling in reference and data images and compare the results to those of implementations in the literature. On this basis, we provide recommended parameters for data sets with different S/N and sampling.